-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add_iter_method_on_state_store #260
Conversation
Codecov Report
@@ Coverage Diff @@
## master #260 +/- ##
==========================================
+ Coverage 78.61% 78.66% +0.05%
==========================================
Files 22 22
Lines 1917 1922 +5
==========================================
+ Hits 1507 1512 +5
Misses 410 410
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be great to see a test too :)
cognite/extractorutils/statestore.py
Outdated
@@ -309,6 +309,10 @@ def __contains__(self, external_id: str) -> bool: | |||
def __len__(self) -> int: | |||
return len(self._local_state) | |||
|
|||
def __iter__(self) -> Iterable: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include the type for the items as well
def __iter__(self) -> Iterable: | |
def __iter__(self) -> Iterable[str]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all set
added the method iter on state store that will return the keys of the dict